<p id="notice"><%= notice %></p>

<table border = "1">
	<tr>
		<td colspan="2"><h4>Invoice</h4> <%= link_to 'Edit', edit_invoice_path(@invoice) %> | <%= link_to 'Back', invoices_path %></td>
	</tr>
	<tr>
		<td><strong>Code:</strong><%= @invoice.code %></td>
		<td><strong>Date:</strong><%= @invoice.date %></td>
	</tr>
	<tr>
		<td>
			<h4>Invoice's Detail</h4>
			<%= render @invoice.invoice_details %>
			<%= link_to 'Add New Invoice Detail', new_invoice_invoice_detail_path(:invoice_id => params[:id]) %> 
		</td>
		<td>		
			<p>
				<strong>Total fee:</strong><%= @invoice.total_fee %></br>
				<strong>Total discount:</strong><%= @invoice.total_discount %></br>
			</p>
		</td>	
	</tr>	
	<tr>
		<td colspan="2">
			<h4>Payment's Detail</h4>
			<%= render @invoice.payments %>
			<%= link_to 'Add New Payment', new_invoice_payment_path(:invoice_id => params[:id]) %>
		</td>
	</tr>
</table>


